package com.cxs.model;

import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

/**
 * air_quality_index
 * @author 
 */
@Data
public class AirQualityIndex implements Serializable {
    /**
     * 主键
     */
    private Integer id;

    /**
     * 指向区域表的主键
     */
    private Integer districtId;

    /**
     * 检测日期
     */
    private Date monitorTime;

    /**
     * pm10
     */
    private Integer pm10;

    /**
     * pm2.5
     */
    private Integer pm25;

    /**
     * 监测站
     */
    private String monitoringStation;

    /**
     * 最后更改时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date lastModifityTime;

    private String districtName;

    private long time1;
    private long time2;
    private String reqTime;

    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        AirQualityIndex other = (AirQualityIndex) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getDistrictId() == null ? other.getDistrictId() == null : this.getDistrictId().equals(other.getDistrictId()))
            && (this.getMonitorTime() == null ? other.getMonitorTime() == null : this.getMonitorTime().equals(other.getMonitorTime()))
            && (this.getPm10() == null ? other.getPm10() == null : this.getPm10().equals(other.getPm10()))
            && (this.getPm25() == null ? other.getPm25() == null : this.getPm25().equals(other.getPm25()))
            && (this.getMonitoringStation() == null ? other.getMonitoringStation() == null : this.getMonitoringStation().equals(other.getMonitoringStation()))
            && (this.getLastModifityTime() == null ? other.getLastModifityTime() == null : this.getLastModifityTime().equals(other.getLastModifityTime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getDistrictId() == null) ? 0 : getDistrictId().hashCode());
        result = prime * result + ((getMonitorTime() == null) ? 0 : getMonitorTime().hashCode());
        result = prime * result + ((getPm10() == null) ? 0 : getPm10().hashCode());
        result = prime * result + ((getPm25() == null) ? 0 : getPm25().hashCode());
        result = prime * result + ((getMonitoringStation() == null) ? 0 : getMonitoringStation().hashCode());
        result = prime * result + ((getLastModifityTime() == null) ? 0 : getLastModifityTime().hashCode());
        return result;
    }


}